package com.sciencep.pro.core.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.sciencep.pro.core.dao.DictMapper;
import com.sciencep.pro.core.service.IDictService;
import com.sciencep.pro.core.domain.entity.Dict;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Sciencep
 */
@Service
public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements IDictService {
    @Override
    public List<Dict> getDictList(String tableName, String fieldName) {
        return this.list(
                new LambdaQueryWrapper<Dict>().eq(Dict::getTableName, tableName).eq(Dict::getFieldName, fieldName)
        );
    }
}
